#pragma once
#include <lcir/IR/LambdaDialect.h>
#include <lcir/IR/LambdaType.h>
#include <lcir/IR/Prototype.h>
#include <lcir/IR/Type.h>
namespace lcir {
/// TODO: 后续加类型校验，确保TypeTy是LambdaType
class Expression;
class LambdaProto : public PrototypeCRTP<LambdaProto, LambdaDialect> {
public:
  LambdaProto(LambdaType *type) : PrototypeCRTP("lambdaProto", type) {}
  std::vector<Type *> getParamTypes() const {
    auto *lambdaType = getType()->dyn_cast<LambdaType>();
    return lambdaType->getParamTypes();
  }
  Type *getResultType() const {
    auto *lambdaType = getType()->dyn_cast<LambdaType>();
    return lambdaType->getResultType();
  }
  ~LambdaProto() = default;
};

} // namespace lcir